<?php

namespace App\Entity;

use App\Models\ComponentProductModel;

class ComponentProductEntity extends ABaseEntity
{
    public function __construct(ComponentProductModel $model)
    {
        $this->model = $model;
    }

    /**
     * @return int
     */
    public function getId(): int
    {
        return (int)$this->model->id;
    }

    /**
     * @param int $id
     */
    public function setId(int $id): void
    {
        $this->model->id = $id;
    }

    /**
     * @return string
     */
    public function getCreatedAt(): string
    {
        return (string)$this->model->created_at;
    }

    /**
     * @param string $created_at
     */
    public function setCreatedAt(string $created_at): void
    {
        $this->model->created_at = $created_at;
    }

    /**
     * @return string
     */
    public function getUpdatedAt(): string
    {
        return (string)$this->model->updated_at;
    }

    /**
     * @param string $updated_at
     */
    public function setUpdatedAt(string $updated_at): void
    {
        $this->model->updated_at = $updated_at;
    }

    /**
     * @return int
     */
    public function getEnable(): int
    {
        return (int)$this->model->enable;
    }

    /**
     * @param int $enable
     */
    public function setEnable(int $enable): void
    {
        $this->model->enable = $enable;
    }

    /**
     * @return string
     */
    public function getPosition(): string
    {
        return (string)$this->model->position;
    }

    /**
     * @param string $position
     */
    public function setPosition(string $position): void
    {
        $this->model->position = $position;
    }

    /**
     * @return int
     */
    public function getProductId(): int
    {
        return (int)$this->model->product_id;
    }

    /**
     * @param int $product_id
     */
    public function setProductId(int $product_id): void
    {
        $this->model->product_id = $product_id;
    }

    /**
     * @return int
     */
    public function getSort(): int
    {
        return (int)$this->model->sort;
    }

    /**
     * @param int $sort
     */
    public function setSort(int $sort): void
    {
        $this->model->sort = $sort;
    }
}
